package com.jiang.daily.Q2269;

/**
 * @author Jiang
 * @version 1.0
 * @date 2025/03/10 1:44
 */
class Solution {
    public int divisorSubstrings(int num, int k) {
        String s = Integer.toString(num);
        int res = 0;
        for (int i = 0; i <= s.length() - k; i++) {
            int v = Integer.parseInt(s.substring(i, i + k));
            if (v !=0 && num % v == 0) res++;
        }
        return res;
    }
}
